package com.esri.core.ags;

import java.io.Serializable;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class Table implements Serializable {
    private static final long serialVersionUID = 1;
    int a;
    String b;

    public int getId() {
        return this.a;
    }

    public String getName() {
        return this.b;
    }

    public static Table fromJson(JsonParser jsonParser) throws Exception {
        if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
            return null;
        }
        Table table = new Table();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String currentName = jsonParser.getCurrentName();
            jsonParser.nextToken();
            if ("id".equals(currentName)) {
                table.a = jsonParser.getIntValue();
            } else if ("name".equals(currentName)) {
                table.b = jsonParser.getText();
            } else {
                jsonParser.skipChildren();
            }
        }
        return table;
    }

    public String toString() {
        return "Tables [id=" + this.a + ", name=" + this.b + "]";
    }

    public int hashCode() {
        int i = (this.a + 31) * 31;
        String str = this.b;
        return i + (str == null ? 0 : str.hashCode());
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && getClass() == obj.getClass()) {
            Table table = (Table) obj;
            if (this.a != table.a) {
                return false;
            }
            String str = this.b;
            if (str == null) {
                if (table.b != null) {
                    return false;
                }
            } else if (!str.equals(table.b)) {
                return false;
            }
            return true;
        }
        return false;
    }
}
